package de.mhu.mandalaui.attributes;

import java.io.PrintWriter;
import java.util.LinkedList;
import java.util.List;

import de.mhu.mandalaui.Response;

public class MultiAttribute extends Attribute {

	LinkedList<BooleanAttribute> attributes = new LinkedList<BooleanAttribute>();
	
	@Override
	public void renderBindCall(PrintWriter out) {
		for (BooleanAttribute a : attributes) {
			out.append(a.getName());
			out.append(':');
			a.renderBindCall(out);
		}
	}

	@Override
	public void renderFunctionImplementation(PrintWriter out) {
	}

	public List<BooleanAttribute> getAttributes() {
		return attributes;
	}
	
	public boolean needFunctionImplementation() {
		return false;
	}

	public void startRender(Response response) {
		super.startRender(response);
		for (BooleanAttribute a : attributes)
			a.startRender(response);
	}

}
